import asyncio

import httpx


async def test_post():
    payload = {
        "type": "device_call",
        "call_id": "test-call-id",
        "device_calls": [{"device_name": "d1", "device_id": "id123", "config": {"led": True}, "order": 1}]
    }
    async with httpx.AsyncClient() as client:
        resp = await client.post("http://localhost:8080/api/push-device-call", json=payload)
        print(resp.status_code, resp.text)

asyncio.run(test_post())
